package com.pro.common.service.properties;

import com.pro.common.api.common.model.ICommonProperties;
import com.pro.common.api.enums.EnumSysRole;
import com.pro.framework.api.entity.IEntityProperties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
@Component
@ConfigurationProperties(prefix = "common")
public class CommonProperties implements IEntityProperties, ICommonProperties {
    private Map<String, String> authDictMap = new HashMap<>();

    /**
     * 例如 snowball demo
     */
    private String platform;

    /**
     * /commonData总开关
     */
    private DataConfig data;

    @Data
    public static class DataConfig {
        Boolean enabled;
    }
    /**
     * 定制实体类
     * 例如:
     * User: com.pro.snowball.api.model.db.Usersnowball
     * UserMoney: com.pro.xxx.api.model.db.UserMoneyXxx
     */
    private Map<String, Class<?>> entityClassReplaceMap = Collections.emptyMap();

    private Map<EnumSysRole, Long> testRoleLoginIdMap = Collections.emptyMap();

    private List<String> authenticatedPaths = Collections.emptyList();
}
